package com.hondee.fuzzyquery.entity.access;

import java.util.ArrayList;
import java.util.List;

public class StoreProcedureQuery implements IQuery {

	private String procedure;
	private List<IQueryParam> params;
	
	public StoreProcedureQuery(String procedure){
		this.procedure = procedure;
		params = new ArrayList<>();
	}
	public StoreProcedureQuery(String procedure,List<IQueryParam> params){
		if(params==null){
			throw new RuntimeException("params list should not be null.");
		}
		this.procedure = procedure;
		this.params = params;
	}
	
	public String getProcedure() {
		return procedure;
	}
	public void setProcedure(String procedure) {
		this.procedure = procedure;
	}
	public List<IQueryParam> getParams() {
		return params;
	}
	public void setParams(List<IQueryParam> params) {
		this.params = params;
	}
	@Override
	public CacheKey generateKey() {
		// TODO Auto-generated method stub
		return null;
	}
	
	public void addParam(IQueryParam param){
		params.add(param);
	}

}
